package org.lg.framework.protocol.http;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class IOUtils {
    public static void write(String content, HttpServletResponse response){
        response.setContentType("text/html;charset=utf-8");
        response.setCharacterEncoding("utf-8");
        PrintWriter out = null;
        try {
            out = response.getWriter();
            out.print(content);

        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            out.flush();
            out.close();
        }

    }
}
